#ifndef ENCLAVEWRAP_T_H__
#define ENCLAVEWRAP_T_H__

#include <stdint.h>
#include <wchar.h>
#include <stddef.h>
#include "sgx_edger8r.h" /* for sgx_ocall etc. */


#define SGX_CAST(type, item) ((type)(item))

#ifdef __cplusplus
extern "C" {
#endif


sgx_status_t SGX_CDECL ocall_get_string(char* buf, int len);
sgx_status_t SGX_CDECL ocall_print_string(const char* string);
sgx_status_t SGX_CDECL ocall_log_info(const char* buf);
sgx_status_t SGX_CDECL ocall_log_warning(const char* buf);
sgx_status_t SGX_CDECL ocall_log_error(const char* buf);
sgx_status_t SGX_CDECL ocall_log_fatal(const char* buf);
sgx_status_t SGX_CDECL ocall_fopen(int* retval, _int64* file, const char* file_name, const char* mode);
sgx_status_t SGX_CDECL ocall_fclose(int* retval, _int64 file);
sgx_status_t SGX_CDECL ocall_fputs(int* retval, _int64 file, const char* buf);
sgx_status_t SGX_CDECL ocall_fseek(int* retval, _int64 file, long int offset, int origin);
sgx_status_t SGX_CDECL ocall_ftell(long int* retval, _int64 file);
sgx_status_t SGX_CDECL ocall_fread(size_t* retval, _int64 file, void* buf, int buf_len, size_t element_size, size_t element_count);
sgx_status_t SGX_CDECL ocall_fgets(char** retval, _int64 file, char* buf, int buf_len);
sgx_status_t SGX_CDECL ocall_is_dir_exsit(int* retval, const char* dri_name);
sgx_status_t SGX_CDECL ocall_make_dir(int* retval, const char* dir_name);
sgx_status_t SGX_CDECL sgx_oc_cpuidex(int cpuinfo[4], int leaf, int subleaf);
sgx_status_t SGX_CDECL sgx_thread_wait_untrusted_event_ocall(int* retval, const void* self);
sgx_status_t SGX_CDECL sgx_thread_set_untrusted_event_ocall(int* retval, const void* waiter);
sgx_status_t SGX_CDECL sgx_thread_setwait_untrusted_events_ocall(int* retval, const void* waiter, const void* self);
sgx_status_t SGX_CDECL sgx_thread_set_multiple_untrusted_events_ocall(int* retval, const void** waiters, size_t total);

#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif
